<template>
	<div class="outer">{{ value }}</div>
	<div class="outer">{{ num }}</div>
	<!-- <teleport to='body'></teleport> -->
	<el-button type="warning" @click="changeConfirm">点我</el-button>
</template>

<script setup>
import emitter from '@/utils/mitt'
const emit = defineEmits(['confirm'])
const props = defineProps({
	value: {
		type: [String, Number],
		default: ''
	}
})
function changeConfirm() {
	// 触发
	emitter.emit('receive', {
		msg: '发送数据'
	})
	emit('confirm', props.value)
}

const num = ref(1)
defineExpose({ num })
</script>

<style lang="scss" scoped></style>
